#include "AlarmZone.h"
#include <vector>
#include <algorithm>
#include "Arm.h"
using namespace std;

AlarmZone* AlarmZone::AZ = NULL;

void AlarmZone::Add(Arm * a)
{
	vector<Arm*>::iterator it;
	it = find(ArmsInZone.begin(),ArmsInZone.end(),a);
	if (it == ArmsInZone.end())
		ArmsInZone.push_back(a);
}
void AlarmZone::Remove(Arm * a)
{
	vector<Arm*>::iterator it;
	it = find(ArmsInZone.begin(),ArmsInZone.end(),a);
	if (it != ArmsInZone.end())
		ArmsInZone.erase(it);
}

AlarmZone *Alarm() 
{
	return AlarmZone::AlarmZoneGet();
}